﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;

public class Viper_S: Missile
{
    public Viper_S()
    {
        m_Price = 180;
        m_Type = ItemsType.WEAPON_SMALL_MISSILE_VIPER_S;
        m_Speciality = Speciality.RUIN;
        ResearchInfluence = InfluenceMG.INFLUENCE_FIRE_STAR;
        m_DamageType = DamageType.TYPE_EXPLOSION;
        ShutRange = 15;
        m_TrunVelocity = 40;
        ShutVelocity = 14f;
        BulletFlyVelocity = 4f;
        Damage = 160;
        m_DropRate = 0.2f;
        m_Hp = 13;
        m_Acceleration = 10;
        Name = "毒蛇-S";
        Perview = "Textures/Weapon/WeaponSmall/Viper-S";
        WeaponResource = "Perfabs/Weapon/Small/Viper-S";
        BulletResource = "Perfabs/Bullet/Viper-S";
        m_FireAudioResouce = "Perfabs/Audio/PuHu";
        Description = "标准-01的改良版，加上了热能制导系统，但各方面的数据相对标准-01来说会略逊一些，即使如此更多的新人驾驶员还是更愿意使用这款武器。";

    }

    public override FlyItem Fire(GameObject ship, WeaponSlot slot, Vector3 position, Vector3 direction)
    {
        Slot = slot;
        var item = base.Fire(ship, slot, position, direction);
        MissileFunction missile = item as MissileFunction;
        if (missile)
            missile.m_Trace = true;
        return item;
    }
}